#!/bin/sh

errorExit() {
echo "*** $@" 1>&2
exit 1
}

curl --silent --max-time 2 --insecure https://localhost:{{ bind_port }}/ -o /dev/null || errorExit "Error GET https://localhost:{{ bind_port }}/"
if ip addr | grep -q {{ vip }}; then
curl --silent --max-time 2 --insecure https://{{ vip }}:{{ bind_port }}/ -o /dev/null || errorExit "Error GET https://{{ vip }}:{{ bind_port }}/"
fi